package restaurant;

/**
 * The Command object to reset a table.
 * 
 * @author Odessa
 */

public class cmdResetTable implements Command
{

	/** The information aggregator. */
	private InformationAggregator info;

	/** The table number of the table to reset. */
	private int tableNo;



	/**
	 * Instantiates a new reset table command.
	 *
	 * @param info the information aggregator.
	 * @param tableNo the table number to reset.
	 */
	public cmdResetTable(InformationAggregator info, int tableNo) {
		this.info = info;
		this.tableNo = tableNo;
	}



	/**
	 * Resets a table.
	 *
	 * @return null.
	 * @see restaurant.Command#execute()
	 */
	@Override
	public Object execute()
	{
		Tables tables = info.getTables();
		tables.resetTable(tableNo);
		
		return null;
	}

}
